﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using CSharp4ExpressionMetaCompiler;
using SStuff.MetaEffects.Model;

namespace Sample2_CompositeShader.Providers
{
    public class InvertYProvider:ITexCoordModifierProvider
    {
        public Expression<Action<TexCoordOnlyParameters>> GetShaderExpression()
        {
            return o =>
                Block.Declare(new TexCoordOnlyParameters(), vars =>
                    Block.Default
                    .Assign(vars.TexCoord, new float2(vars.TexCoord.x, 1.0f - vars.TexCoord.y))
                 );
        }
    }
}
